<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="{{ asset('AdminPublic/favicon.ico') }}" >
<link rel="Shortcut Icon" href="{{ asset('AdminPublic/favicon.ico') }}" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="{{ asset('AdminPublic/static/h-ui/css/H-ui.min.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('AdminPublic/static/h-ui.admin/css/H-ui.admin.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('AdminPublic/lib/Hui-iconfont/1.0.8/iconfont.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('AdminPublic/static/h-ui.admin/skin/default/skin.css') }}" id="skin" />
<link rel="stylesheet" type="text/css" href="{{ asset('AdminPublic/static/h-ui.admin/css/style.css') }}" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script><![endif]-->
<!--/meta 作为公共模版分离出去-->

<link href="{{ asset('AdminPublic/lib/webuploader/0.1.5/webuploader.css') }}" rel="stylesheet" type="text/css" />
</head>
<body class="pos-r">


<div class="page-container">
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 图片列表   <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
@if (session('msg'))
<div class="Huialert Huialert-error">
  <i class="Hui-iconfont">&#xe6a6;</i>{{ session('msg') }}
</div>
@endif

	<!-- <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 图片管理 <span class="c-gray en">&gt;</span> 图片列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav> -->
	<div class="page-container" style="padding-top:0px;">
		<div class="mt-20">
			<table class="table table-border table-bordered table-bg table-hover table-sort">
				<thead>
					<tr class="text-c">
						<th width="40">商品展示表ID</th>
						<th width="40">商品gid</th>
						<th width="60">商品名</th>
						<th width="80">商品细节图</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
				
				@foreach($res as $v)
					<tr class="text-c va-m">
						<td>{{ $v->id }}</td>
						<td>{{ $v->goods_id }}</td>
						<td>{{ $good->goods_name }}</td>
						<td>
						
						<img width="60px" class="product-thumb" src="http://oydt3ttm3.bkt.clouddn.com/{{ $v->pic }}"></td>
						
						<td class="td-manage">
						<!-- 查看商品详情 -->
						<a style="text-decoration:none" class="ml-5" onClick="good_detail('商品详情','{{ route('goodsdetail', ['id' => $v->goods_id]) }}' ,',','1000','500')" href="javascript:;" title="查看详情"><i class="Hui-iconfont">&#xe620;</i></a>

						
						<a style="text-decoration:none" class="ml-5" onClick="good_del(this, {{ $v->id }})" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
					</tr>
				@endforeach		
				</tbody>
				
			</table>
			
		</div>
	</div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="{{ asset('AdminPublic/lib/jquery/1.9.1/jquery.min.js') }}"></script> 
<script type="text/javascript" src="{{ asset('AdminPublic/lib/layer/2.4/layer.js') }}"></script>
<script type="text/javascript" src="{{ asset('AdminPublic/static/h-ui/js/H-ui.js') }}"></script> 
<script type="text/javascript" src="{{ asset('AdminPublic/static/h-ui.admin/js/H-ui.admin.page.js') }}"></script>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="{{ asset('AdminPublic/lib/My97DatePicker/4.8/WdatePicker.js') }}"></script> 

<script type="text/javascript" src="{{ asset('AdminPublic/lib/jquery.validation/1.14.0/jquery.validate.js') }}"></script> 
<script type="text/javascript" src="{{ asset('AdminPublic/lib/jquery.validation/1.14.0/validate-methods.js') }}"></script> 
<script type="text/javascript" src="{{ asset('AdminPublic/lib/jquery.validation/1.14.0/messages_zh.js') }}"></script> 
<script type="text/javascript" src="{{ asset('AdminPublic/lib/webuploader/0.1.5/webuploader.min.js') }}"></script> 
<script type="text/javascript" src="{{ asset('AdminPublic/lib/ueditor/1.4.3/ueditor.config.js') }}"></script>
<script type="text/javascript" src="{{ asset('AdminPublic/lib/ueditor/1.4.3/ueditor.all.min.js') }}"> </script>
<script type="text/javascript" src="{{ asset('AdminPublic/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js') }}"></script>
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	})});

/*查看详情*/
function good_detail(title,url,id,w,h){
	layer_show(title,url,w,h);
}


/*删除*/
function good_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$.ajax({
			type:'get',
			url:'{{route("delimage")}}',
			data: 'id='+id,
			
			success:function (msg) {

				//删除失败
				if (msg.status == 404) {
					layer.msg(msg.msg, {icon:1,time:1000});
					return false;
				}	

				//删除成功
				if (msg.status == 200) {
					layer.msg(msg.msg, {icon:1,time:1000});
					$(obj).parents("tr").remove();
					return false;
				}
			},
			// error:function (e,a,b) {
			// 	errorObj = JSON.parse(e.responseText);
			// 	console.log(errorObj);
			// },
			dataType:'json'
		});
		// $(obj).parents("tr").remove();
		// layer.msg('已删除!',{icon:1,time:1000});
	});
}

</script>
